/*
 * Powered By [rapid-framework]
 * Web Site: http://www.rapid-framework.org.cn
 * Google Code: http://code.google.com/p/rapid-framework/
 * Since 2008 - 2016
 */

package com.jzwl.xydk.manager.user.userBasicinfo.service;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.jzwl.common.page.PageObject;
import com.jzwl.xydk.manager.user.userBasicinfo.dao.UserBasicinfoDao;


@Service("userBasicinfoService")
public class UserBasicinfoService {
	
	
	@Autowired
	private UserBasicinfoDao userBasicinfoDao;
	
	public boolean addUserBasicinfo(Map<String, Object> map) {
		
		return userBasicinfoDao.addUserBasicinfo(map);
		
	}

	public PageObject queryUserBasicinfoList(Map<String, Object> map) {
		
		return userBasicinfoDao.queryUserBasicinfoList(map);
	
	}

	public boolean updateUserBasicinfo(Map<String, Object> map) {
	
		boolean flag = userBasicinfoDao.updateUserBasicinfo(map);
		boolean flag2 = userBasicinfoDao.updateUserTemporary(map);
		
		return flag&flag2;
	
	}

	public boolean deleteUserBasicinfo(Map<String, Object> map) {
		
		return userBasicinfoDao.deleteUserBasicinfo(map);
	
	}
	
	
	@SuppressWarnings("unchecked")
	public Map<String,Object> getById(Map<String, Object> map) {
		
		return userBasicinfoDao.getById(map);
		
	}
	//查询所属省
	@SuppressWarnings("unchecked")
	public Map<String,Object> getProvence(String cityId) {
		
		return userBasicinfoDao.getProvence(cityId);
		
	}
	//查询所属学校
	@SuppressWarnings("unchecked")
	public Map<String,Object> getSholName(String sholId) {
		
		return userBasicinfoDao.getSholName(sholId);
		
	}
	
	/**
	 * 根据城市的id,获取城市下的学校
	 * @param paramsMap
	 * @return
	 */
	public List querySchoolInfoByCityId(Map<String, Object> map) {
		
		return userBasicinfoDao.querySchoolInfoByCityId(map);
	}
	
	/**
	 * 根据省查出市
	 * @param paramsMap
	 * @return
	 */
	public List queryCityByPro(String provence) {
		return userBasicinfoDao.queryCityByPro(provence);
	}
	
	//从校咖（xiaoka）数据库中获取全部城市数据
	public List<Map<String, Object>> getCityInfo() {

		return userBasicinfoDao.getCityInfo();
	}
	
	
	

	
}
